package com.example.mapper;

import com.example.POJO.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserMapper {


    @Insert("INSERT INTO user (id,name, sex, birth, identy) VALUES (#{id},#{name}, #{sex}, #{birth}, #{identy})")
    void insertUser(User user);
    @Select("Select * from user where id=#{id}")
    User getUserById(Integer id);
    @Update("update user set name=#{name},sex=#{sex},birth=#{birth} where id=#{id}")
    void updateUser(User user);
}
